/***************************************************************************
Name:		chathandler.h
Autor:		Kevin Huber
Version:	0.1 Alpha
Last Edit:      12.06.2009

Beschreibung:
Diese Klasse behandelt von der durch die Methode parseCommand() eingehende "Tunnel://" Commands.
***************************************************************************/

#ifndef CHATHANDLER_H
#define CHATHANDLER_H

#include <QObject>
#include "tunnel_struckts.h"

class ChatHandler : public QObject
{
    Q_OBJECT

public:
    ChatHandler(QObject *parent = 0);
    ~ChatHandler();

    void handleNewMessage(const QString &message, const QString &to);
    void handleSystemCommand(const quint16 &category, const quint16 &command, const QString &arguments);

signals:
    void changeNickname(const QString &newNickname);
    void newPrivateMessage(const QString &message, const QString &to);
    void newGlobalMessage(const QString &message);
    void authCommand(const QString &arguments);
    void getFriendlist();
    void addFriend(const QString &arguments);
    void getFriendrequests();
    void acceptFriendInventation(const quint32 &applicant_uid);
    void error(const QString &error);

public slots:
    void handlePackage(Package *package);

};

#endif // CHATHANDLER_H
